import com.hbl.xyl.User;
import org.apache.commons.lang3.RandomStringUtils;

import java.lang.reflect.Method;
import java.util.Random;

public class APPxyl {
    public static void main(String[] args) throws Exception{
       // String s= RandomStringUtils.randomAlphabetic(6);
        // System.out.println(s);
        User a=new User();
        a.setName("hhh");
        System.out.println(a.getName());
        a.setAge("19");
        System.out.println(a.getAge());


        Class<?>zzz= Class.forName("com.hbl.xyl.User");
        Object o = zzz.newInstance();//Ctrl+Alt+v 自动生成左边内容

        Method setName = zzz.getMethod("setName", String.class);
        setName.invoke(o,"nice");


        Method getName = zzz.getMethod("getName");
        Object result = getName.invoke(o);
        System.out.println(result);


    }
}
